package com.ruoyi.driver.carservicestatics.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.driver.carservicestatics.ro.*;
import com.ruoyi.driver.carservicestatics.service.DriverCarServiceStaticsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * 驾驶端运营管理
 * 
 * @author xly
 * @date 2021-12-08
 */
@Api(tags = "驾驶端运营管理")
@RestController
@RequestMapping("/driver/carservicestatics")
public class DriverCarServiceStaticsController extends BaseController
{
    @Autowired
    private DriverCarServiceStaticsService driverCarServiceStaticsService;


    @GetMapping("/statics-list-dirver")
    @ApiOperation("驾驶员运营情况")
    public AjaxResult listDirver(@Valid GetDriverCarServiceStaticsListDriverParam param)
    {
        return AjaxResult.success(driverCarServiceStaticsService.listDirver(param,getLoginUser().getUsername()));
    }

    @GetMapping("/statics-list-dirver-detail")
    @ApiOperation("驾驶员运营明细")
    public AjaxResult listDirverDetail(@Valid GetDriverCarServiceStaticsListDriverParam param)
    {
        return AjaxResult.success(driverCarServiceStaticsService.listDirverDetail(param,getLoginUser().getUsername()));
    }

}
